//
//  MeCell.m
//  pmmSS
//
//  Created by Mac book on 2017/9/11.
//  Copyright © 2017年 WTFSSD. All rights reserved.
//

#import "MeCell.h"

@interface  MeCell()

@property (nonatomic,strong) UIImageView *iconImageView;

@property (nonatomic,strong) UILabel *iconLabel;

@end
@implementation MeCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self iniSubViews];
    }
    return self;



}

-(void)iniSubViews{


    WeakSelf(weakSelf);

    _iconLabel = [ HMLabel createLabelWithText:@"8866" andTextColor:[UIColor blackColor]andBgColor:nil andFont:[UIFont fontWithName:default_fontname size:autoScaleW(14)] andTextAlignment:NSTextAlignmentLeft];

    [self addSubview:_iconLabel];

    [_iconLabel mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerY.mas_equalTo(weakSelf);
        make.left.mas_equalTo(autoScaleW(63));
        make.width.mas_equalTo(autoScaleW(100));
        make.height.mas_equalTo(autoScaleH(17));

    }];

    _iconImageView =  [[UIImageView alloc] init];

   _iconImageView.backgroundColor = RGBA(253, 138, 40, 1);

//[_iconImageView setImage:[UIImage imageNamed:@"icon_comment"]];

    [self addSubview:_iconImageView];
    [_iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerY.mas_equalTo(weakSelf);
        make.left.mas_equalTo(autoScaleW(26));
        make.width.mas_equalTo(autoScaleW(20));
        make.height.mas_equalTo(autoScaleH(20));

    }];

    UIImageView *rightImage = [[UIImageView alloc]init];

    [rightImage setImage:[UIImage imageNamed:@"icon_arrow_right_gray"]];
    [self.contentView addSubview:rightImage];

    [rightImage mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerY.mas_equalTo(weakSelf.contentView);
        make.right.mas_equalTo(weakSelf.contentView).offset(autoScaleW(-15));

        make.height.mas_equalTo(autoScaleW(18));

        make.width.mas_equalTo(autoScaleH(9));
        
    }];


}

-(void)reloadWithModel:(MeModel *)model{

   // NSLog(@"model.iconLabel=====%@",model.iconTitle);

    _iconLabel.text = [NSString stringWithFormat:@"%@", model.iconTitle];
}

@end
